<template>
  <div>
      <h1>{{day()}}</h1>
  </div>
</template>

<script>
export default {
methods:{
    day(){
            let time1=+new Date();
           let time2=+new Date("1998-03-08")
           let time3=time1-time2;
           let time=time3/1000;
           let d = parseInt(time / 60 / 60 / 24);
           return `已经生活了${d}天`
        }
},

}
</script>

<style>

</style>